Update packaging for 0.20.0, ./configure is gone
authorXimin Luo <infinity0@debian.org>
Tue, 25 Jul 2017 12:47:33 +0000 (14:47 +0200)
committerXimin Luo <infinity0@debian.org>
Tue, 25 Jul 2017 12:47:33 +0000 (14:47 +0200)
debian/TODO.Debian
debian/cargohome/config
debian/changelog
debian/install
debian/rules

index e42015090beb1ab48466f996baadd72dcf01cdfb..1691d98abb779a03973204a957710b8dfe016ec4 100644 (file)
@@ -1,3 +1,10 @@
 - transition libgit to 0.25
 - write better explanation for the libdbghelp.a stuff
 - work around https://github.com/rust-lang/rust/issues/43449
+
+Later
+=====
+
+A lot of stuff here is shared with dh-cargo. We should use that instead.
+
+Specifically, d/cargohome/config and the override_dh_auto_* rules
index 0cbcdfa27a22d96e8a39dec8fd9adf6fd3e5c53f..db4947ee34a5356e6a389ce06aeacb1549dbb78a 100644 (file)
@@ -3,3 +3,6 @@ replace-with = "dh-cargo-registry"
 
 [source.dh-cargo-registry]
 directory = "../vendor"
+
+[build]
+rustflags = "-g"
index 86f32eb194458a5d20aceaf88092247a13e4b515..1e71bbfbe6663617f4fa73d1d5a3086b5179f20b 100644 (file)
@@ -1,8 +1,10 @@
-cargo (0.17.0-3) UNRELEASED; urgency=medium
+cargo (0.20.0-1) UNRELEASED; urgency=medium
 
+  * New upstream release.
   * Fix cross-compiling declarations, Multi-Arch: foreign => allowed
+  * Un-embed libgit2 0.25.1 again.
 
- -- Ximin Luo <infinity0@debian.org>  Wed, 21 Jun 2017 15:30:28 +0200
+ -- Ximin Luo <infinity0@debian.org>  Tue, 25 Jul 2017 14:46:16 +0200
 
 cargo (0.17.0-2) unstable; urgency=medium
 
index 5245675046655fca482bbe294370da9777bdea23..a1ad6e4ffdf53403785938e7ec13bb345683994d 100644 (file)
@@ -1,2 +1,2 @@
-target/*/release/cargo                  usr/bin
+target/release/cargo                    usr/bin
 debian/scripts/*                        usr/share/cargo
index c1ef37d449ff35aea5ecf59e6607a3f125f49311..ec8da18a5819eeb1704535b5bf8249e0bf8a4b63 100755 (executable)
@@ -14,6 +14,8 @@ RUSTFLAGS += -C linker=$(DEB_HOST_GNU_TYPE)-gcc
 RUSTFLAGS += $(foreach flag,$(LDFLAGS),-C link-arg=$(flag))
 export CFLAGS CXXFLAGS CPPFLAGS LDFLAGS RUSTFLAGS
 
+CARGO = RUST_BACKTRACE=1 cargo
+CARGOFLAGS = --release
 # Cargo looks for config in and writes cache to $CARGO_HOME/
 export CARGO_HOME = $(CURDIR)/debian/cargohome
 # Ask cargo to be verbose when building
@@ -43,39 +45,29 @@ ifneq ($(filter pkg.cargo.mkstage0,$(DEB_BUILD_PROFILES)),)
        # Workaround for https://github.com/rust-lang/cargo/issues/1423
        ln -s `find $(CURDIR)/deps -name 'cargo-*' -type f -executable` $(CURDIR)/cargo-stage0
 else
-       ln -s `which cargo` $(CURDIR)/cargo-stage0
+       ln -sf `which cargo` $(CURDIR)/cargo-stage0
 endif
+       debian/scripts/prune-checksums vendor/backtrace-sys-*/
        debian/scripts/prune-checksums vendor/libgit2-sys-*/
-       # Configure to build cargo using the just-built stage0
-       ./configure \
-               --prefix=/usr \
-               --disable-debug \
-               --enable-optimize \
-               --local-rust-root=/usr \
-               --release-channel=stable \
-               --cargo=$(CURDIR)/cargo-stage0 \
-               --build=$(DEB_BUILD_RUST_TYPE) \
-               --host=$(DEB_HOST_RUST_TYPE) \
-               --target=$(DEB_TARGET_RUST_TYPE)
 
 override_dh_auto_build-arch:
-       RUST_BACKTRACE=1 $(MAKE)
+       $(CARGO) build $(CARGOFLAGS)
 
 override_dh_auto_build-indep:
 ifeq (,$(findstring nodoc,$(DEB_BUILD_PROFILES)))
-       $(MAKE) doc
+       $(CARGO) doc $(CARGOFLAGS)
        cd target/doc/ && rm -f jquery.js && ln -s /usr/share/javascript/jquery/jquery.js
 endif
 
 override_dh_auto_test:
-       RUST_BACKTRACE=1 CFG_DISABLE_CROSS_TESTS=1 dh_auto_test
+       CFG_DISABLE_CROSS_TESTS=1 $(CARGO) test $(CARGOFLAGS)
 
 override_dh_auto_install:
        # We pick stuff directly from target/
 
 override_dh_auto_clean:
        -mv $(CURDIR)/.Cargo.lock.orig $(CURDIR)/Cargo.lock
-       dh_auto_clean
+       $(CARGO) clean $(CARGOFLAGS)
        -$(RM) -r $(CURDIR)/target/ \
                        $(CURDIR)/.cargo \
                        $(CURDIR)/config.mk \